﻿using System;
using FamilyBook.Core.Configuration;
using FamilyBook.Core.Entities;
using FamilyBook.Core.Services;

namespace FamilyBook.Tests
{
    public class TestHelper
    {
        public static AppConfig GetConfig()
        {
            return new AppConfig();
        }

        public static Person CreatePerson(CounterpartyService cpSrv)
        {
            var peron = new Person()
            {
                //CounterpartyId = -1,
                FirstName = "FN_" + Guid.NewGuid().ToString(),
                LastName = "LN_" + Guid.NewGuid().ToString()
            };
            return cpSrv.CreatePerson(peron);
        }

        public static Organization CreateOrganization(CounterpartyService cpRep)
        {
            var org = new Organization()
            {
                Name = "Org_" + Guid.NewGuid().ToString(),
            };
            org.Description = "Desc_" + org.Name;

            return cpRep.CreateOrganization(org);
        }
    }
}
